/***************************************************************************
 创建者：华磊
 开始时间：         : 2020.12.17
 copyright            : (C) 深圳市华友高科有限公司
 修改说明：（每次有修改就添加一条，带有 修改人，修改时间，修改描述）

 ***************************************************************************
 *   跳过指令属性编辑视窗
*                                                                         *
 ***************************************************************************/
#include "skipconditiondelegate.h"
#include <QDebug>

SkipConditionDelegate::SkipConditionDelegate(QWidget *parent):
    QObject(parent)
{
}

void SkipConditionDelegate::initialView()
{
    skipConditionView->conditionSkipHead = "SKIP CONDITION";
    skipConditionView->conditionSkipTail = "Skip,LBL";

    skipConditionView->condition = "condition";
    skipConditionView->lblIndex = "1";

    skipConditionView->conditionHeadFlag = 1;
    skipConditionView->conditionTailFlag = 1;

    skipConditionView->note = "";

    //skipConditionView->updateView();
}

void SkipConditionDelegate::selectConditionHeadSlot()
{
    skipConditionView->conditionHeadFlag = 1;

    qDebug("select condition head");
}

void SkipConditionDelegate::selectConditionTailSlot()
{
    skipConditionView->conditionTailFlag = 1;

    qDebug("select condition tail");
}

void SkipConditionDelegate::clearNoteSlot()
{
    skipConditionView->note.clear();

    qDebug("clear note");
}

void SkipConditionDelegate::finishEditInstructionSlot()
{
    skipConditionView->conditionSkipHead = "SKIP ";
    skipConditionView->conditionSkipTail = "Skip,LBL";

    skipConditionView->conditionSkipHead += + "CONDITION" + skipConditionView->condition + "; " + "//" + skipConditionView->note;

    skipConditionView->conditionSkipTail += "[" + skipConditionView->lblIndex + "]" + "; " + "//";
}
